package linearstructure.sparsearray;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-05-21 19:24
 * @ Description : 矩阵持久化操作
 */
public class IO
{
    public void save(int [][] array)
    {
        try
        {
            BufferedWriter out = new BufferedWriter(new FileWriter("array.txt"));
            for (int[] row : array)
            {
                for (int data : row)
                {
                    out.write(data);
                }
            }

            out.close();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    public int [][] recover()
    {

        return null;
    }

}
